import axios from 'axios';

axios.defaults.baseURL ='http://localhost:3001';

export const post = (url,data,config={})=>{
    return new Promise((resolve, reject) => {
        axios.post(url,data,config)
            .then(res=>{
                resolve(res);
            })
            .catch(error=>{
                reject(error);
            })
    })
};